// 在这里面定义所有接口，一个文件管理所有接口，易于维护
import {
  http
} from './http'; // 引入刚刚封装好的http模块，import属于ES6的语法，微信开发者工具必须打开ES6转ES5选项

// 订单列表
function orderList(postData, doSuccess, doFail, doComplete) {
  http('/order/list', 'post', postData, doSuccess, doFail, doComplete)
}

// 订单详情
function orderDetail(postData, doSuccess, doFail, doComplete) {
  http('/order/getDataById', 'post', postData, doSuccess, doFail, doComplete)
}

//订单状态修改
function updateStutas(postData, doSuccess, doFail, doComplete) {
  http('/order/updateStutas', 'post', postData, doSuccess, doFail, doComplete)
}

export default { // 暴露接口
  orderList,
  orderDetail,
  updateStutas
}